package com.baidu.day06;

public class Demo03 {
    public static void main(String[] args) {
        Cat cat = new Cat();
        cat.setName("咪咪");
        String name1 = cat.getName();
        System.out.println(name1);

        Dog dog = new Dog();
        dog.setName("旺财");
        String name2 = dog.getName();
        System.out.println(name2);

        cat.voice();
    }
}
